"""
文件读写
"""
# file = open("a.txt")
# print(file)
# print(file.read())
# file.close()

# file = open("静夜思.txt","r",encoding="utf-8")
# print(file.read())
# file.close()

#省略file.close(),程序执行完成后自动执行file.close()
with open("静夜思.txt","r",encoding="utf-8") as file:
    print(file.read())